<?
$from=$this->currentPage-5;
if ($from<1)
{
	$from=1;
}
$to=$this->currentPage+5;
if ($to>$this->totalPages)
{
	$to=$this->totalPages;
}
if ($this->ext_param)
{
	$ext_param=$this->ext_param;
}
else
{
	$ext_param="";
}
if (!$this->obj)
{
	$obj="kết quả";
}
else
{
	$obj=$this->obj;;
}
?>
<? if ($this->totalItems > 0){ ?>
 <!--Start: PageView-->
<div class="pageView text-right relative">
    <span>Tổng số <?echo number_format($this->totalItems, 0, ",", ".")?> <?echo $obj?> / <?echo $this->totalPages?> trang. </span>
    <span>
        <?
        if ($this->currentPage>1)
        {
            echo $this->pagerLink($this->url, $ext_param, 1, '&laquo;');
            echo $this->pagerLink($this->url, $ext_param, $this->currentPage -1, '&lsaquo;');            
        }
        if ($from>1)
        {
            echo "&nbsp;...&nbsp;...&nbsp;";
        }
        for ($page=$from; $page<=$to; $page++)
        {
            if ($page==$this->currentPage)
            {
                echo '<span class="itemS">' . $this->currentPage . '</span>&nbsp;';
            }
            else
            {
                
                echo $this->pagerLink($this->url, $ext_param, $page, $page);
            }
        }
        if ($to<$this->totalPages)
        {
            echo "&nbsp;...&nbsp;...&nbsp;";
        }
        if ($this->currentPage<$this->totalPages)
        {
           echo $this->pagerLink($this->url, $ext_param, $this->currentPage + 1, '&rsaquo;');
           echo $this->pagerLink($this->url, $ext_param, $this->totalPages, '&raquo;');           
        }
        ?>                                                                             
        <div class="clear"></div>
    </span>
</div>
<? } else {?>
<div class="pageView text-right relative">
  Chưa có <?= $obj?> nào
</div>
<? } ?>
<!--End: PageView-->    

 